<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<h2>거래처 정보</h2>

<table class="form_table">
	<colgroup>
	<col width="120"/>
	<col width="*"/>
	<col width="120"/>
	<col width="*"/>
	</colgroup>
	<thead>
		<tr><th colspan="6">시설기본정보</th></tr>
	</thead>
	<tbody>
   		<tr>
			<th>시설명</th>
			<td>${buildingModel.buildingDao.buildingName}</td>
			<th>측정 대상 구분</th>
			<td>${buildingModel.buildingDao.measureTargetTxt}</td>
   		</tr>
   		<tr>
			<th>구주소</th>
			<td colspan="3">
				<c:if test="${!empty buildingModel.buildingDao.buildingZipcode}">( ${buildingModel.buildingDao.buildingZipcode} )</c:if>
				${buildingModel.buildingDao.buildingAddr}
			</td>
   		</tr>
   		<tr>
			<th >신주소</th>
			<td colspan="3">${buildingModel.buildingDao.buildingNewAddr}</td>
   		</tr>
   		<tr>
			<th >특이사항</th>
			<td colspan="3">${buildingModel.buildingDao.buildingMemo}</td>
   		</tr>
	</tbody>
</table>
<table class="form_table">
	<colgroup>
	<col width="120"/>
	<col width="*"/>
	<col width="120"/>
	<col width="*"/>
	<col width="120"/>
	<col width="*"/>
	</colgroup>
	<thead>
		<tr><th colspan="6">사업자정보</th></tr>
	</thead>
	<tbody>
		<tr>
			<th>사업자명</th>
			<td colspan="3">${buildingModel.buildingDao.companyName}</td>
			<th>사업자번호</th>
			<td>${buildingModel.buildingDao.companyNumber}</td>
		</tr>
		<tr>
			<th>대표자명</th>
			<td>${buildingModel.buildingDao.companyPresident}</td>
			<th>업태</th>
			<td>${buildingModel.buildingDao.businessConditions}</td>
			<th>종목</th>
			<td>${buildingModel.buildingDao.businessType}</td>
		</tr>
		<tr>
			<th>사업장주소</th>
			<td colspan="5">${buildingModel.buildingDao.businessAddr}</td>
		</tr>
	</tbody>
</table>
<table id="inchargeTable" class="form_table">
	<thead>
		<tr>
			<th colspan="8">
				담당자정보
			</th>
		</tr>
		<tr>
			<th scope="row" >이름</th>
			<th scope="row" >부서</th>
			<th scope="row" >직위</th>
			<th scope="row" >전화</th>
			<th scope="row" >핸드폰</th>
			<th scope="row" >팩스</th>
			<th scope="row" >메일</th>
			<th scope="row" >특이사항</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${buildingModel.buildingDao.incharge}" var="incharge" varStatus="loop2">
			<tr>
				<td>${incharge.inchargeName}</td>
				<td>${incharge.inchargeDepartment}</td>
				<td>${incharge.inchargeRank}</td>
				<td>${incharge.inchargeTel}</td>
				<td>${incharge.inchargePhone}</td>
				<td>${incharge.inchargeFax}</td>
				<td>${incharge.inchargeEmail}</td>
				<td>${incharge.inchargeMemo}</td>
			</tr>
		</c:forEach>
	</tbody>
</table><!-- /widget-content -->
<table id="estimateTable" class="form_table">
	<thead>
		<tr>
			<th colspan="6">측정</th>
		</tr>
		<tr>
			<th scope="row" >견적일</th>
			<th scope="row" >측정일</th>
			<th scope="row" >측정타입</th>
			<th scope="row" >부가세여부</th>
			<th scope="row" >금액</th>
			<th scope="row" >비고</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${buildingModel.buildingDao.estimate}" var="estimate" varStatus="loop2">
			<tr>
				<td class="textC">${estimate.estimatDate}</td>
				<td class="textC">${estimate.measureDate}</td>
				<td>${estimate.measureTypeTxt}</td>
				<td>${estimate.estimatSurtaxTxt}</td>
				<td>${estimate.estimatSum}</td>
				<td>${estimate.estimatMemo}</td>
			</tr>
		</c:forEach>
		<c:if test="${empty buildingModel.buildingDao.estimate}">
			<tr><td colspan="6">측정 내역이 없습니다.</td></tr>
		</c:if>
	</tbody>
</table><!-- /widget-content -->
<div class="btn-box txt-right">
	<button type="reset" class="btn btn-info"><i class="icon-refresh icon-txt"></i>새로고침</button>
	<a href="<c:url value='/c/list.do'/>" class="btn"><i class="icon-list icon-txt"></i>목록</a>
</div>
